import java.util.Scanner;

/**
 * @author gao
 * @date 2025/6/5 19:30
 */

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int pass = 0;
        int fail = 0;
        for (int i = 0; i < n; i++) {
            while (true) {
                try {
                    int score = in.nextInt();
                    if (score < 0 || score > 100) {
                        throw new InvalidScoreException(score);
                    } else if (score >= 60) {
                        pass++;
                    } else {
                        fail++;
                    }
                    break;
                } catch (InvalidScoreException e) {
                    System.out.println(e.toString());
                }
            }
        }
        System.out.println(pass);
        System.out.println(fail);
    }
}

class InvalidScoreException extends Exception {
    int score;

    public InvalidScoreException(int score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return score + "invalid!";
    }
}